#include "FileUploadDataTask.h"
#include "FileUploadTask.h"
#include "TcpConnection.h"
#include "MessageCodec.h"
#include "protocol.h"
#include "block_log.h"
#include <thread>

FileUploadDataTask::FileUploadDataTask(TcpConnection* conn, const std::string& jsonBody)
    : m_conn(conn), m_jsonBody(jsonBody)
{
}

FileUploadDataTask::~FileUploadDataTask()
{
}

void FileUploadDataTask::work(void* arg)
{
    Debug("FileUploadDataTask 开始执行（数据块），线程 ID: %llu", std::this_thread::get_id());
    
    // 调用 FileUploadTask 的静态方法处理数据块
    FileUploadTask::handleFileChunk(m_conn, m_jsonBody);
    
    Debug("FileUploadDataTask 执行完成");
}

